package com.lch.designpattern.singleton.hungry;

/**
 * 饿汉式单例模式
 *
 * @author: liuchenhui
 * @create: 2019-04-15 09:31
 **/
public class HungryStaticSingleton {

    private static HungryStaticSingleton hungrySingleton;

    private HungryStaticSingleton() {
    }

    static {
        hungrySingleton = new HungryStaticSingleton();
    }

    public static HungryStaticSingleton getInstance() {
        return hungrySingleton;
    }
}
